<?php $this->load->view('header'); ?>
 <div id="title_background">
	<div class="wrapper"><!-- 900px wrapper -->
		<h1>Galeri Photo</h1>
		<!--<span class="title_description">This is crossroads for features. Here you could describe your page or leave it blank.</span>-->
	</div> <!-- 900px wrapper -->
</div>
</div>
<div class="cleaner"></div>
<div id="position_navi"><a href="index.html">Beranda</a> / Photo</div>
<div id="content">
	<article>
		<h1>Upload Foto</h1>
		<!--<p class="caps">alumni kepolisian</p>
		<p>Berbagi foto dengan teman anda.</p>-->
		<form class="contact_form" method="POST" enctype="multipart/form-data">
			<span>Status: *</span>
			<select name="status">
				<option <?php if($photos[0]['status'] == 'public' ) { echo "selected='selected'"; }?>  value="public">Publik</option>
				<option <?php if($photos[0]['status'] == 'private' ) { echo "selected='selected'"; }?> value="private">Private</option>
			</select>
			<span>Judul:*</span><input type="text" name="judul" required="required" autocomplete="off" value="<?php if(isset($photos[0]['judul'])){ echo $photos[0]['judul']; } ?>"/>
			<span>Album:</span><input type="text" name="album" autocomplete="on" value="<?php if(isset($photos[0]['album'])){ echo $photos[0]['album']; } ?>"/>
			<span>Deskripsi</span><textarea name="deskripsi"><?php if(isset($photos[0]['deskripsi'])){ echo $photos[0]['deskripsi']; } ?></textarea>
			<span>Foto:* <!--<font color="red">(unggah gambar dengan ekstensi .jpg)</font>--></span>
			<?php 
			$img = base_url(). PHOTO_PATH . $photos[0]['foto'];
			if($photos != NULL){?>
				<img style="width:100px" src="<?php echo $img;?>">
				<input type="file" name="photo_upload"><?php
			}else{ ?>
				<input type="file" name="photo_upload" required="required"><?php
			} ?>
			<input type="submit" value="Unggah" name="photo_submit"/>
		</form>
	</article>        

<div class="cleaner"></div>
</div>
<div class="cleaner"></div>
<?php $this->load->view('footer', $footer); ?>